﻿<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
-->

<UserControl x:Class="Microsoft.Windows.Controls.Testing.WithinTemplate"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:theming="clr-namespace:Microsoft.Windows.Controls.Theming;assembly=Microsoft.Windows.Controls.Theming"
    theming:ImplicitStyleManager.ApplyMode="OneTime">
    <Grid Background="White">
        <Grid.Resources>
            <Style TargetType="Button">
                <Setter Property="Foreground" Value="Red" />
            </Style>

            <Style TargetType="ContentControl">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ContentControl">
                            <Button Content="Style for ContentControl" Style="{StaticResource System.Windows.Controls.Button}"/>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </Grid.Resources>

        <ContentControl x:Name="contentControl"/>

    </Grid>
</UserControl>
